ui: fixes for release
* screen search matches in code view single not always cleared * fixed copy full path in file title button broken * fixed last snippet scrollbar not immediatly visible
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
#include <QScrollBar>
|
||||
#include <QVBoxLayout>
|
||||
#include <QTimer>
|
||||
|
||||
#include "utility/file/FilePath.h"
|
||||
#include "utility/utilityApp.h"
|
||||
@@ -219,7 +220,8 @@ void QtCodeFileList::updateFiles()
|
||||
file->updateContent();
|
||||
}
|
||||
|
||||
updateSnippetTitleAndScrollBar();
|
||||
// Perform delayed so all widgets are already visible
|
||||
QTimer::singleShot(100, this, &QtCodeFileList::updateSnippetTitleAndScrollBarSlot);
|
||||
}
|
||||
|
||||
void QtCodeFileList::showContents()
|
||||
@@ -332,6 +334,11 @@ void QtCodeFileList::resizeEvent(QResizeEvent* event)
|
||||
updateSnippetTitleAndScrollBar();
|
||||
}
|
||||
|
||||
void QtCodeFileList::updateSnippetTitleAndScrollBarSlot()
|
||||
{
|
||||
updateSnippetTitleAndScrollBar(0);
|
||||
}
|
||||
|
||||
void QtCodeFileList::updateSnippetTitleAndScrollBar(int value)
|
||||
{
|
||||
QtCodeFile* firstFile = nullptr;
|
||||
|
||||
@@ -58,6 +58,7 @@ protected:
|
||||
virtual void resizeEvent(QResizeEvent* event);
|
||||
|
||||
private slots:
|
||||
void updateSnippetTitleAndScrollBarSlot();
|
||||
void updateSnippetTitleAndScrollBar(int value = 0);
|
||||
void scrollLastSnippet(int value);
|
||||
void scrollLastSnippetScrollBar(int value);
|
||||
|
||||
@@ -141,7 +141,7 @@ void QtCodeFileTitleButton::updateFromOther(const QtCodeFileTitleButton* other)
|
||||
void QtCodeFileTitleButton::contextMenuEvent(QContextMenuEvent* event)
|
||||
{
|
||||
FilePath path = m_filePath;
|
||||
if (text().size())
|
||||
if (path.empty())
|
||||
{
|
||||
Project* currentProject = Application::getInstance()->getCurrentProject().get();
|
||||
if (!currentProject)
|
||||
|
||||
@@ -238,8 +238,7 @@ void QtCodeNavigator::clearCodeSnippets()
|
||||
|
||||
m_singleHasNewFile = false;
|
||||
|
||||
m_screenMatches.clear();
|
||||
m_activeScreenMatchId = 0;
|
||||
clearScreenMatches();
|
||||
}
|
||||
|
||||
void QtCodeNavigator::clearFile()
|
||||
|
||||
Reference in New Issue
Block a user