Sfoglia il codice sorgente

fixed issue with always on top, sometimes it was not setting it to be always on top

git-svn-id: svn://svn.code.sf.net/p/ditto-cp/code/trunk@768 595ec19a-5cb4-439b-94a8-42fb3063c22c
sabrogden 10 anni fa
parent
commit
3c7bd0758f
1 ha cambiato i file con 5 aggiunte e 4 eliminazioni
  1. 5 4
      QPasteWnd.cpp

+ 5 - 4
QPasteWnd.cpp

@@ -3094,6 +3094,8 @@ bool CQPasteWnd::DoActionBackGroup()
 bool CQPasteWnd::DoActionToggleShowPersistant()
 {
 	theApp.ShowPersistent(!g_Opt.m_bShowPersistent);
+	if(g_Opt.m_bShowPersistent)
+		::SetWindowPos(m_hWnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE | SWP_SHOWWINDOW);
 
 	return true;
 }
@@ -4072,12 +4074,11 @@ void CQPasteWnd::OnNcLButtonDblClk(UINT nHitTest, CPoint point)
     {
         switch(g_Opt.m_bDoubleClickingOnCaptionDoes)
         {
-            case TOGGLES_ALLWAYS_ON_TOP:
-				::SetWindowPos(m_hWnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE | SWP_SHOWWINDOW);
-                theApp.ShowPersistent(!g_Opt.m_bShowPersistent);
+            case TOGGLES_ALLWAYS_ON_TOP:				
+				DoAction(ActionEnums::TOGGLESHOWPERSISTANT);                
                 break;
             case TOGGLES_ALLWAYS_SHOW_DESCRIPTION:
-                CGetSetOptions::SetAllwaysShowDescription(!g_Opt.m_bAllwaysShowDescription);
+				DoAction(ActionEnums::SHOWDESCRIPTION);    
                 break;
             case ROLLES_UP_WINDOW:
                 MinMaxWindow();