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:
Eberhard Graether
2018-01-12 13:03:50 +01:00
parent 911c0fabba
commit ab5cab3656
4 changed files with 11 additions and 4 deletions
+8 -1
View File
@@ -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;
+1
View File
@@ -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)
+1 -2
View File
@@ -238,8 +238,7 @@ void QtCodeNavigator::clearCodeSnippets()
m_singleHasNewFile = false;
m_screenMatches.clear();
m_activeScreenMatchId = 0;
clearScreenMatches();
}
void QtCodeNavigator::clearFile()