mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-10-30 12:11:15 -06:00 
			
		
		
		
	Linux specific: Fixed ObjectDataViewModel::GetColumnType()
When "string" type was returned, strange editing TextControl was appeared. + Added check of the selection for ObjectList::toggle_printable_state() function
This commit is contained in:
		
							parent
							
								
									426d2cd725
								
							
						
					
					
						commit
						b87c03fc09
					
				
					 3 changed files with 12 additions and 1 deletions
				
			
		|  | @ -3909,6 +3909,8 @@ void ObjectList::toggle_printable_state() | |||
| { | ||||
|     wxDataViewItemArray sels; | ||||
|     GetSelections(sels); | ||||
|     if (sels.IsEmpty()) | ||||
|         return; | ||||
| 
 | ||||
|     wxDataViewItem frst_item = sels[0]; | ||||
| 
 | ||||
|  |  | |||
|  | @ -1180,6 +1180,15 @@ int ObjectDataViewModel::GetExtruderNumber(const wxDataViewItem& item) const | |||
| 	return atoi(node->m_extruder.c_str()); | ||||
| } | ||||
| 
 | ||||
| wxString ObjectDataViewModel::GetColumnType(unsigned int col) const | ||||
| { | ||||
|     if (col == colName || col == colExtruder) | ||||
|         return wxT("DataViewBitmapText"); | ||||
|     if (col == colPrint || col == colEditing) | ||||
|         return wxT("DataViewBitmap"); | ||||
|     return wxT("string"); | ||||
| } | ||||
| 
 | ||||
| void ObjectDataViewModel::GetValue(wxVariant &variant, const wxDataViewItem &item, unsigned int col) const | ||||
| { | ||||
| 	wxASSERT(item.IsOk()); | ||||
|  |  | |||
|  | @ -316,7 +316,7 @@ public: | |||
|     // helper methods to change the model
 | ||||
| 
 | ||||
|     unsigned int    GetColumnCount() const override { return 3;} | ||||
|     wxString        GetColumnType(unsigned int col) const override{ return wxT("string"); } | ||||
|     wxString        GetColumnType(unsigned int col) const override; | ||||
| 
 | ||||
|     void GetValue(  wxVariant &variant, | ||||
|                     const wxDataViewItem &item, | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 YuSanka
						YuSanka