Pin inspector window if opened with context menu

This commit is contained in:
Lawrence Lee 2021-04-25 17:27:57 -07:00
parent 67e18b5c53
commit d4bceb5c06
3 changed files with 4 additions and 4 deletions

View File

@ -2100,5 +2100,5 @@ void FileBrowser::openRequested( std::vector<FileBrowserEntry*> mselected)
void FileBrowser::inspectRequested(std::vector<FileBrowserEntry*> mselected) void FileBrowser::inspectRequested(std::vector<FileBrowserEntry*> mselected)
{ {
getInspector()->showWindow(false, false); getInspector()->showWindow(false, false, true);
} }

View File

@ -117,7 +117,7 @@ Inspector::~Inspector()
delete window; delete window;
} }
void Inspector::showWindow(bool scaled, bool fullscreen) void Inspector::showWindow(bool scaled, bool fullscreen, bool pinned)
{ {
if (!window) if (!window)
return; return;
@ -137,7 +137,7 @@ void Inspector::showWindow(bool scaled, bool fullscreen)
window->unfullscreen(); window->unfullscreen();
this->fullscreen = fullscreen; this->fullscreen = fullscreen;
window->set_visible(true); window->set_visible(true);
pinned = false; this->pinned = pinned;
// update content when becoming visible // update content when becoming visible
switchImage(next_image_path); switchImage(next_image_path);

View File

@ -89,7 +89,7 @@ public:
/** @brief Show or hide window /** @brief Show or hide window
* @param scaled fit image into window * @param scaled fit image into window
*/ */
void showWindow(bool scaled, bool fullscreen = true); void showWindow(bool scaled, bool fullscreen = true, bool pinned = false);
/** /**
* Hide the window. * Hide the window.